package ym.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;
import ym.pojo.Announcement;

import java.io.IOException;
import java.util.List;

public interface AnnouncementService {
    void add(Announcement announcement);

    void update(Announcement announcement);

    void delete(Integer id);

    Announcement findById(Integer id);

    List<Announcement> findAll();

    Page<Announcement> search(String search, int page, int size);

    //导出Excel
    void exportExcel(HttpServletResponse response) throws IOException;

    //导入Excel
    boolean importExcel(MultipartFile file) throws IOException;
}
